package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.markup_config_condition;
import com.ymttest.database.model.godmch.markup_config_conditionExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface markup_config_conditionMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @SelectProvider(type=markup_config_conditionSqlProvider.class, method="countByExample")
    int countByExample(markup_config_conditionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @DeleteProvider(type=markup_config_conditionSqlProvider.class, method="deleteByExample")
    int deleteByExample(markup_config_conditionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @Delete({
        "delete from markup_config_condition",
        "where markup_id = #{markup_id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer markup_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @Insert({
        "insert into markup_config_condition (markup_id, agent_id, ",
        "supplier_id, condition_type, ",
        "markup_type, percentage, ",
        "decimal_type, on_sale_type, ",
        "refresh_product, config_status, ",
        "create_time, update_time, ",
        "condition_list)",
        "values (#{markup_id,jdbcType=INTEGER}, #{agent_id,jdbcType=INTEGER}, ",
        "#{supplier_id,jdbcType=INTEGER}, #{condition_type,jdbcType=INTEGER}, ",
        "#{markup_type,jdbcType=INTEGER}, #{percentage,jdbcType=DECIMAL}, ",
        "#{decimal_type,jdbcType=INTEGER}, #{on_sale_type,jdbcType=INTEGER}, ",
        "#{refresh_product,jdbcType=BIT}, #{config_status,jdbcType=INTEGER}, ",
        "#{create_time,jdbcType=TIMESTAMP}, #{update_time,jdbcType=TIMESTAMP}, ",
        "#{condition_list,jdbcType=LONGVARCHAR})"
    })
    int insert(markup_config_condition record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @InsertProvider(type=markup_config_conditionSqlProvider.class, method="insertSelective")
    int insertSelective(markup_config_condition record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @SelectProvider(type=markup_config_conditionSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="markup_id", property="markup_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="agent_id", property="agent_id", jdbcType=JdbcType.INTEGER),
        @Result(column="supplier_id", property="supplier_id", jdbcType=JdbcType.INTEGER),
        @Result(column="condition_type", property="condition_type", jdbcType=JdbcType.INTEGER),
        @Result(column="markup_type", property="markup_type", jdbcType=JdbcType.INTEGER),
        @Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL),
        @Result(column="decimal_type", property="decimal_type", jdbcType=JdbcType.INTEGER),
        @Result(column="on_sale_type", property="on_sale_type", jdbcType=JdbcType.INTEGER),
        @Result(column="refresh_product", property="refresh_product", jdbcType=JdbcType.BIT),
        @Result(column="config_status", property="config_status", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="condition_list", property="condition_list", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<markup_config_condition> selectByExampleWithBLOBs(markup_config_conditionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @SelectProvider(type=markup_config_conditionSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="markup_id", property="markup_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="agent_id", property="agent_id", jdbcType=JdbcType.INTEGER),
        @Result(column="supplier_id", property="supplier_id", jdbcType=JdbcType.INTEGER),
        @Result(column="condition_type", property="condition_type", jdbcType=JdbcType.INTEGER),
        @Result(column="markup_type", property="markup_type", jdbcType=JdbcType.INTEGER),
        @Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL),
        @Result(column="decimal_type", property="decimal_type", jdbcType=JdbcType.INTEGER),
        @Result(column="on_sale_type", property="on_sale_type", jdbcType=JdbcType.INTEGER),
        @Result(column="refresh_product", property="refresh_product", jdbcType=JdbcType.BIT),
        @Result(column="config_status", property="config_status", jdbcType=JdbcType.INTEGER),
        @Result(column="condition_list", property="condition_list", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<markup_config_condition> selectByExample(markup_config_conditionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @Select({
        "select",
        "markup_id, agent_id, supplier_id, condition_type, markup_type, percentage, decimal_type, ",
        "on_sale_type, refresh_product, config_status, create_time, update_time, condition_list",
        "from markup_config_condition",
        "where markup_id = #{markup_id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="markup_id", property="markup_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="agent_id", property="agent_id", jdbcType=JdbcType.INTEGER),
        @Result(column="supplier_id", property="supplier_id", jdbcType=JdbcType.INTEGER),
        @Result(column="condition_type", property="condition_type", jdbcType=JdbcType.INTEGER),
        @Result(column="markup_type", property="markup_type", jdbcType=JdbcType.INTEGER),
        @Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL),
        @Result(column="decimal_type", property="decimal_type", jdbcType=JdbcType.INTEGER),
        @Result(column="on_sale_type", property="on_sale_type", jdbcType=JdbcType.INTEGER),
        @Result(column="refresh_product", property="refresh_product", jdbcType=JdbcType.BIT),
        @Result(column="config_status", property="config_status", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="condition_list", property="condition_list", jdbcType=JdbcType.LONGVARCHAR)
    })
    markup_config_condition selectByPrimaryKey(Integer markup_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @UpdateProvider(type=markup_config_conditionSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") markup_config_condition record, @Param("example") markup_config_conditionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @UpdateProvider(type=markup_config_conditionSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") markup_config_condition record, @Param("example") markup_config_conditionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @UpdateProvider(type=markup_config_conditionSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") markup_config_condition record, @Param("example") markup_config_conditionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @UpdateProvider(type=markup_config_conditionSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(markup_config_condition record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @Update({
        "update markup_config_condition",
        "set agent_id = #{agent_id,jdbcType=INTEGER},",
          "supplier_id = #{supplier_id,jdbcType=INTEGER},",
          "condition_type = #{condition_type,jdbcType=INTEGER},",
          "markup_type = #{markup_type,jdbcType=INTEGER},",
          "percentage = #{percentage,jdbcType=DECIMAL},",
          "decimal_type = #{decimal_type,jdbcType=INTEGER},",
          "on_sale_type = #{on_sale_type,jdbcType=INTEGER},",
          "refresh_product = #{refresh_product,jdbcType=BIT},",
          "config_status = #{config_status,jdbcType=INTEGER},",
          "create_time = #{create_time,jdbcType=TIMESTAMP},",
          "update_time = #{update_time,jdbcType=TIMESTAMP},",
          "condition_list = #{condition_list,jdbcType=LONGVARCHAR}",
        "where markup_id = #{markup_id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(markup_config_condition record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_condition
     *
     * @mbggenerated Tue Jul 07 10:42:28 CST 2020
     */
    @Update({
        "update markup_config_condition",
        "set agent_id = #{agent_id,jdbcType=INTEGER},",
          "supplier_id = #{supplier_id,jdbcType=INTEGER},",
          "condition_type = #{condition_type,jdbcType=INTEGER},",
          "markup_type = #{markup_type,jdbcType=INTEGER},",
          "percentage = #{percentage,jdbcType=DECIMAL},",
          "decimal_type = #{decimal_type,jdbcType=INTEGER},",
          "on_sale_type = #{on_sale_type,jdbcType=INTEGER},",
          "refresh_product = #{refresh_product,jdbcType=BIT},",
          "config_status = #{config_status,jdbcType=INTEGER},",
          "create_time = #{create_time,jdbcType=TIMESTAMP},",
          "update_time = #{update_time,jdbcType=TIMESTAMP}",
        "where markup_id = #{markup_id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(markup_config_condition record);
}